package com.itheima.dao.impl;

/*
持久层接口的实现类
 */
import com.itheima.dao.UserDao;
import com.itheima.domain.User;

public class UserDaoImpl implements UserDao {
    /*
    按照用户名和密码查询对应的用户信息
     */
   public User findByNameAndPwd(String username, String pwd){
       User u =null;
       if("admin".equals(username)&&"666".equals(pwd)){
           u =new User();
           u.setId(12);
           u.setUsername("admin");
           u.setPwd("666");
       }
       return u;
   }
}
